<?php
namespace Admin\Controller;
use Think\Controller;
class BaseController extends Controller {
    public function __construct(){
        parent::__construct();
        if (empty(session('uid'))) {
            if(!defined("UID")){
                define('UID',session('uid'));
            }
        } else {
            $this->error('您还没有登录',U('Login/index'),3);
        }
    }
}